Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std: Move the bitflags! macro to a gated crate #21254

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Member

In accordance with collections reform part 2 this macro has been moved to
an external bitflags crate which is available though
crates.io
. Inside the standard distribution the macro has been moved
to a crate called rustc_bitflags for current users to continue using.

The major user of bitflags! in terms of a public-facing possibly-stable API
today is the FilePermissions structure inside of std::io. This user,
however, will likely no longer use bitflags! after I/O reform has landed. To
prevent breaking APIs today, this structure remains as-is.

Current users of the bitflags! macro should add this to their Cargo.toml:

bitflags = "0.1"

and this to their crate root:

#[macro_use] extern crate bitflags;

Due to the removal of a public macro, this is a:

[breaking-change]

@rust-highfive
Copy link
Collaborator

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@aturon aturon mentioned this pull request Jan 16, 2015
38 tasks
@alexcrichton
Copy link
Member Author

r? @aturon

In accordance with [collections reform part 2][rfc] this macro has been moved to
an external [bitflags crate][crate] which is [available though
crates.io][cratesio]. Inside the standard distribution the macro has been moved
to a crate called `rustc_bitflags` for current users to continue using.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
[crate]: https://github.com/rust-lang/bitflags
[cratesio]: http://crates.io/crates/bitflags

The major user of `bitflags!` in terms of a public-facing possibly-stable API
today is the `FilePermissions` structure inside of `std::io`. This user,
however, will likely no longer use `bitflags!` after I/O reform has landed. To
prevent breaking APIs today, this structure remains as-is.

Current users of the `bitflags!` macro should add this to their `Cargo.toml`:

    bitflags = "0.1"

and this to their crate root:

    #[macro_use] extern crate bitflags;

Due to the removal of a public macro, this is a:

[breaking-change]
bors added a commit that referenced this pull request Jan 17, 2015
std: Move the bitflags! macro to a gated crate

Reviewed-by: aturon
bors added a commit that referenced this pull request Jan 17, 2015
std: Move the bitflags! macro to a gated crate

Reviewed-by: aturon
@steveklabnik
Copy link
Member

Doing this manually as part of #21300

fantix added a commit to fantix/nix-rust that referenced this pull request Jan 18, 2015
fantix added a commit to fantix/mio that referenced this pull request Jan 18, 2015
fantix added a commit to fantix/mio that referenced this pull request Jan 18, 2015
@alexcrichton alexcrichton deleted the no-more-bitflags branch January 19, 2015 21:13
little-arhat pushed a commit to little-arhat/nix-rust that referenced this pull request Feb 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants